﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Summary description for IComments
/// </summary>
public interface IComments
{
    /// <summary>
    /// Get list object Comments of object Posts
    /// </summary>
    /// <param name="post">Object Posts has comments</param>
    /// <returns>Return list object Comments of object Posts</returns>
    List<Comments> GetListCommentsOfPost(Posts post);

    /// <summary>
    /// Get list object Comments of object Users and object Post
    /// </summary>
    /// <param name="user">Ojbect Users posted comment</param>
    /// <param name="post">Object Posts stored comments</param>
    /// <returns>Return list object Comments</returns>
    List<Comments> GetListCommentsOfUsersAndPost(Users user, Posts post);

    /// <summary>
    /// Create object Comments
    /// </summary>
    /// <param name="user">Object Users want to create</param>
    /// <param name="contents">Contents of object Comments</param>
    /// <param name="privacy">Privacy of object Comments</param>
    /// <param name="post">Article store object Comments</param>
    /// <returns>Return result was created</returns>
    bool CreateComment(Users user, string contents, bool privacy, Posts post);

    /// <summary>
    /// Delete object Comments
    /// </summary>
    /// <param name="comment">Object Comments want to delete</param>
    /// <returns>Return result was deleted</returns>
    bool DeleteComment(Comments comment);

    DataTable GetDataTableCommentsOfPost(int idPost);
}